composetable: Fix an off-by-one
authorMatthias Clasen <mclasen@redhat.com>
Mon, 1 Feb 2021 13:40:31 +0000 (08:40 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 1 Feb 2021 17:10:05 +0000 (12:10 -0500)
Fix an off-by-one in the code parsing octal escapes
in compose files.

gtk/gtkcomposetable.c

index 901a7ecbf9e1c685db4e64a94649ee3285fd4110..94e3421f7be8e0547f2aff7b430152fc2e7265ba 100644 (file)
@@ -100,8 +100,8 @@ parse_compose_value (GtkComposeData *compose_data,
       if (uch == '\0' && words[2][0] == '"')
         uch = '"';
       /* The escaped octal */
-      else if (uch >= '0' && uch <= '8')
-        uch = g_ascii_strtoll(words[1] + 1, NULL, 8);
+      else if (uch >= '0' && uch < '8')
+        uch = g_ascii_strtoll (words[1] + 1, NULL, 8);
       /* If we need to handle other escape sequences. */
       else if (uch != '\\')
         {